package main

import "fmt"

func intSeq() func() int {
	i := 0
	return func() int {
		i++
		return i
	}
}



func main() {
	// the same object
	a := intSeq()
	fmt.Println(a())
	fmt.Println(a())

	// another
	newInts := intSeq()
	fmt.Println(newInts())
}


//question why a() and a() are not the same?